// components/searbar/index.js
Component({
    options: {
        addGlobalClass: true,
        type: 1
    },
    /**
     * 组件的属性列表
     */
    properties: {

    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {
        search(e) {
            let myEventDetail = e.detail.value
            this.triggerEvent('search', myEventDetail)
        },
        bindViewTap() {
            wx.navigateTo({
                url: '../classify/index'
            })
        },
        bindViewTap2() {
            if (this.data.type == 1) {
                return
            }
            this.triggerEvent('myevent')
        }
    }
})